package com.example.springbott.wx_controller;

import com.example.springbott.bean.BaseRespVo;
import com.example.springbott.bean.kerbal.WxHomeIndexVo;

import com.example.springbott.bean.silic.WXHomeAboutVo;
import com.example.springbott.wx_service.WxHomeService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("wx/home")
public class WxHomeController {
    @Autowired
    WxHomeService wxHomeService;

    @RequestMapping("index")
    public BaseRespVo wxHomeIndex(){
        WxHomeIndexVo wxHomeIndexVo = wxHomeService.wxHomeIndex();
      return   BaseRespVo.ok(wxHomeIndexVo);
    }

    /**
     *  个人中心——关于我们about
     *
     * @param /null
     * @return {"errno":0,"data":{"qq":"12312312@qq.com","address":"test-demo1","phone":"19900092220","latitude":"31.201900","name":"商场配置test","longitude":"888"},"errmsg":"成功"}
     * @author  silic xia
     * @since 2022/11/23 17:16
     */
    @RequestMapping("about")
    public BaseRespVo wxHomeAbout(){
        WXHomeAboutVo data = wxHomeService.wxHomeAbout();
        return BaseRespVo.ok(data);
    }

}
